3.70 \(\int \frac{\left (d+e x^n\right )^2}{a+b x^n+c x^{2 n}} \, dx\)

Optimal. Leaf size=224 \[ \frac{x \left (\frac{-2 c e (a e+b d)+b^2 e^2+2 c^2 d^2}{\sqrt{b^2-4 a c}}-b e^2+2 c d e\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b-\sqrt{b^2-4 a c}}\right )}{c \left (b-\sqrt{b^2-4 a c}\right )}+\frac{x \left (-\frac{-2 c e (a e+b d)+b^2 e^2+2 c^2 d^2}{\sqrt{b^2-4 a c}}-b e^2+2 c d e\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )}{c \left (\sqrt{b^2-4 a c}+b\right )}+\frac{e^2 x}{c} \]

[Out]

(e^2*x)/c + ((2*c*d*e - b*e^2 + (2*c^2*d^2 + b^2*e^2 - 2*c*e*(b*d + a*e))/Sqrt[b
^2 - 4*a*c])*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b - Sqrt[b^2
 - 4*a*c])])/(c*(b - Sqrt[b^2 - 4*a*c])) + ((2*c*d*e - b*e^2 - (2*c^2*d^2 + b^2*
e^2 - 2*c*e*(b*d + a*e))/Sqrt[b^2 - 4*a*c])*x*Hypergeometric2F1[1, n^(-1), 1 + n
^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])/(c*(b + Sqrt[b^2 - 4*a*c]))

_______________________________________________________________________________________

Rubi [A]  time = 0.930949, antiderivative size = 224, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 3, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.115 \[ \frac{x \left (\frac{-2 c e (a e+b d)+b^2 e^2+2 c^2 d^2}{\sqrt{b^2-4 a c}}-b e^2+2 c d e\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b-\sqrt{b^2-4 a c}}\right )}{c \left (b-\sqrt{b^2-4 a c}\right )}+\frac{x \left (-\frac{-2 c e (a e+b d)+b^2 e^2+2 c^2 d^2}{\sqrt{b^2-4 a c}}-b e^2+2 c d e\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )}{c \left (\sqrt{b^2-4 a c}+b\right )}+\frac{e^2 x}{c} \]

Antiderivative was successfully verified.

[In]  Int[(d + e*x^n)^2/(a + b*x^n + c*x^(2*n)),x]

[Out]

(e^2*x)/c + ((2*c*d*e - b*e^2 + (2*c^2*d^2 + b^2*e^2 - 2*c*e*(b*d + a*e))/Sqrt[b
^2 - 4*a*c])*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b - Sqrt[b^2
 - 4*a*c])])/(c*(b - Sqrt[b^2 - 4*a*c])) + ((2*c*d*e - b*e^2 - (2*c^2*d^2 + b^2*
e^2 - 2*c*e*(b*d + a*e))/Sqrt[b^2 - 4*a*c])*x*Hypergeometric2F1[1, n^(-1), 1 + n
^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])/(c*(b + Sqrt[b^2 - 4*a*c]))

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 120.378, size = 410, normalized size = 1.83 \[ - \frac{2 c d^{2} x{{}_{2}F_{1}\left (\begin{matrix} 1, \frac{1}{n} \\ 1 + \frac{1}{n} \end{matrix}\middle |{- \frac{2 c x^{n}}{b + \sqrt{- 4 a c + b^{2}}}} \right )}}{- 4 a c + b^{2} + b \sqrt{- 4 a c + b^{2}}} - \frac{2 c d^{2} x{{}_{2}F_{1}\left (\begin{matrix} 1, \frac{1}{n} \\ 1 + \frac{1}{n} \end{matrix}\middle |{- \frac{2 c x^{n}}{b - \sqrt{- 4 a c + b^{2}}}} \right )}}{- 4 a c + b^{2} - b \sqrt{- 4 a c + b^{2}}} - \frac{4 c d e x^{n + 1}{{}_{2}F_{1}\left (\begin{matrix} 1, \frac{n + 1}{n} \\ 2 + \frac{1}{n} \end{matrix}\middle |{- \frac{2 c x^{n}}{b + \sqrt{- 4 a c + b^{2}}}} \right )}}{\left (b + \sqrt{- 4 a c + b^{2}}\right ) \left (n + 1\right ) \sqrt{- 4 a c + b^{2}}} + \frac{4 c d e x^{n + 1}{{}_{2}F_{1}\left (\begin{matrix} 1, \frac{n + 1}{n} \\ 2 + \frac{1}{n} \end{matrix}\middle |{- \frac{2 c x^{n}}{b - \sqrt{- 4 a c + b^{2}}}} \right )}}{\left (b - \sqrt{- 4 a c + b^{2}}\right ) \left (n + 1\right ) \sqrt{- 4 a c + b^{2}}} - \frac{2 c e^{2} x^{2 n + 1}{{}_{2}F_{1}\left (\begin{matrix} 1, 2 + \frac{1}{n} \\ 3 + \frac{1}{n} \end{matrix}\middle |{- \frac{2 c x^{n}}{b + \sqrt{- 4 a c + b^{2}}}} \right )}}{\left (b + \sqrt{- 4 a c + b^{2}}\right ) \left (2 n + 1\right ) \sqrt{- 4 a c + b^{2}}} + \frac{2 c e^{2} x^{2 n + 1}{{}_{2}F_{1}\left (\begin{matrix} 1, 2 + \frac{1}{n} \\ 3 + \frac{1}{n} \end{matrix}\middle |{- \frac{2 c x^{n}}{b - \sqrt{- 4 a c + b^{2}}}} \right )}}{\left (b - \sqrt{- 4 a c + b^{2}}\right ) \left (2 n + 1\right ) \sqrt{- 4 a c + b^{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((d+e*x**n)**2/(a+b*x**n+c*x**(2*n)),x)

[Out]

-2*c*d**2*x*hyper((1, 1/n), (1 + 1/n,), -2*c*x**n/(b + sqrt(-4*a*c + b**2)))/(-4
*a*c + b**2 + b*sqrt(-4*a*c + b**2)) - 2*c*d**2*x*hyper((1, 1/n), (1 + 1/n,), -2
*c*x**n/(b - sqrt(-4*a*c + b**2)))/(-4*a*c + b**2 - b*sqrt(-4*a*c + b**2)) - 4*c
*d*e*x**(n + 1)*hyper((1, (n + 1)/n), (2 + 1/n,), -2*c*x**n/(b + sqrt(-4*a*c + b
**2)))/((b + sqrt(-4*a*c + b**2))*(n + 1)*sqrt(-4*a*c + b**2)) + 4*c*d*e*x**(n +
 1)*hyper((1, (n + 1)/n), (2 + 1/n,), -2*c*x**n/(b - sqrt(-4*a*c + b**2)))/((b -
 sqrt(-4*a*c + b**2))*(n + 1)*sqrt(-4*a*c + b**2)) - 2*c*e**2*x**(2*n + 1)*hyper
((1, 2 + 1/n), (3 + 1/n,), -2*c*x**n/(b + sqrt(-4*a*c + b**2)))/((b + sqrt(-4*a*
c + b**2))*(2*n + 1)*sqrt(-4*a*c + b**2)) + 2*c*e**2*x**(2*n + 1)*hyper((1, 2 +
1/n), (3 + 1/n,), -2*c*x**n/(b - sqrt(-4*a*c + b**2)))/((b - sqrt(-4*a*c + b**2)
)*(2*n + 1)*sqrt(-4*a*c + b**2))

_______________________________________________________________________________________

Mathematica [A]  time = 1.47557, size = 348, normalized size = 1.55 \[ \frac{2^{-\frac{n+1}{n}} x \left (-\left (c d \left (d \sqrt{b^2-4 a c}-4 a e\right )-a e^2 \sqrt{b^2-4 a c}+b \left (a e^2+c d^2\right )\right ) \left (\frac{c x^n}{-\sqrt{b^2-4 a c}+b+2 c x^n}\right )^{-1/n} \, _2F_1\left (-\frac{1}{n},-\frac{1}{n};\frac{n-1}{n};\frac{b-\sqrt{b^2-4 a c}}{2 c x^n+b-\sqrt{b^2-4 a c}}\right )+\left (-c d \left (d \sqrt{b^2-4 a c}+4 a e\right )+a e^2 \sqrt{b^2-4 a c}+b \left (a e^2+c d^2\right )\right ) \left (\frac{c x^n}{\sqrt{b^2-4 a c}+b+2 c x^n}\right )^{-1/n} \, _2F_1\left (-\frac{1}{n},-\frac{1}{n};\frac{n-1}{n};\frac{b+\sqrt{b^2-4 a c}}{2 c x^n+b+\sqrt{b^2-4 a c}}\right )+c d^2 2^{\frac{1}{n}+1} \sqrt{b^2-4 a c}\right )}{a c \sqrt{b^2-4 a c}} \]

Antiderivative was successfully verified.

[In]  Integrate[(d + e*x^n)^2/(a + b*x^n + c*x^(2*n)),x]

[Out]

(x*(2^(1 + n^(-1))*c*Sqrt[b^2 - 4*a*c]*d^2 - ((-(a*Sqrt[b^2 - 4*a*c]*e^2) + c*d*
(Sqrt[b^2 - 4*a*c]*d - 4*a*e) + b*(c*d^2 + a*e^2))*Hypergeometric2F1[-n^(-1), -n
^(-1), (-1 + n)/n, (b - Sqrt[b^2 - 4*a*c])/(b - Sqrt[b^2 - 4*a*c] + 2*c*x^n)])/(
(c*x^n)/(b - Sqrt[b^2 - 4*a*c] + 2*c*x^n))^n^(-1) + ((a*Sqrt[b^2 - 4*a*c]*e^2 -
c*d*(Sqrt[b^2 - 4*a*c]*d + 4*a*e) + b*(c*d^2 + a*e^2))*Hypergeometric2F1[-n^(-1)
, -n^(-1), (-1 + n)/n, (b + Sqrt[b^2 - 4*a*c])/(b + Sqrt[b^2 - 4*a*c] + 2*c*x^n)
])/((c*x^n)/(b + Sqrt[b^2 - 4*a*c] + 2*c*x^n))^n^(-1)))/(2^((1 + n)/n)*a*c*Sqrt[
b^2 - 4*a*c])

_______________________________________________________________________________________

Maple [F]  time = 0.058, size = 0, normalized size = 0. \[ \int{\frac{ \left ( d+e{x}^{n} \right ) ^{2}}{a+b{x}^{n}+c{x}^{2\,n}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((d+e*x^n)^2/(a+b*x^n+c*x^(2*n)),x)

[Out]

int((d+e*x^n)^2/(a+b*x^n+c*x^(2*n)),x)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \frac{e^{2} x}{c} - \int -\frac{c d^{2} - a e^{2} +{\left (2 \, c d e - b e^{2}\right )} x^{n}}{c^{2} x^{2 \, n} + b c x^{n} + a c}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*x^n + d)^2/(c*x^(2*n) + b*x^n + a),x, algorithm="maxima")

[Out]

e^2*x/c - integrate(-(c*d^2 - a*e^2 + (2*c*d*e - b*e^2)*x^n)/(c^2*x^(2*n) + b*c*
x^n + a*c), x)

_______________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \[{\rm integral}\left (\frac{e^{2} x^{2 \, n} + 2 \, d e x^{n} + d^{2}}{c x^{2 \, n} + b x^{n} + a}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*x^n + d)^2/(c*x^(2*n) + b*x^n + a),x, algorithm="fricas")

[Out]

integral((e^2*x^(2*n) + 2*d*e*x^n + d^2)/(c*x^(2*n) + b*x^n + a), x)

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((d+e*x**n)**2/(a+b*x**n+c*x**(2*n)),x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{{\left (e x^{n} + d\right )}^{2}}{c x^{2 \, n} + b x^{n} + a}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((e*x^n + d)^2/(c*x^(2*n) + b*x^n + a),x, algorithm="giac")

[Out]

integrate((e*x^n + d)^2/(c*x^(2*n) + b*x^n + a), x)